/**
 * @Auther: ChenforCode
 * @Date: 2018/9/11 12:07
 * @Description:
 */
package cn.chenforcode.entity;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;

@Entity
public class BookAdmin {
    private String baname;
    private String batel;
    private String bapwd;

    @Id
    @Column(name = "BANAME")
    public String getBaname() {
        return baname;
    }

    public void setBaname(String baname) {
        this.baname = baname;
    }

    @Basic
    @Column(name = "BATEL")
    public String getBatel() {
        return batel;
    }

    public void setBatel(String batel) {
        this.batel = batel;
    }

    @Basic
    @Column(name = "BAPWD")
    public String getBapwd() {
        return bapwd;
    }

    public void setBapwd(String bapwd) {
        this.bapwd = bapwd;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        BookAdmin bookadmin = (BookAdmin) o;

        if (baname != null ? !baname.equals(bookadmin.baname) : bookadmin.baname != null) return false;
        if (batel != null ? !batel.equals(bookadmin.batel) : bookadmin.batel != null) return false;
        if (bapwd != null ? !bapwd.equals(bookadmin.bapwd) : bookadmin.bapwd != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = baname != null ? baname.hashCode() : 0;
        result = 31 * result + (batel != null ? batel.hashCode() : 0);
        result = 31 * result + (bapwd != null ? bapwd.hashCode() : 0);
        return result;
    }

    public BookAdmin(String baname, String batel, String bapwd) {
        this.baname = baname;
        this.batel = batel;
        this.bapwd = bapwd;
    }

    public BookAdmin() {
    }
}
